package com.dianpingmedia.simulate.model;


import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.List;

public class IFlyGetAdEntity {
    public static class Request {
        @NotBlank(message = "req_id cannot be null")
        private String req_id;
        private Integer req_source;
        @NotNull(message = "req_time cannot be null")
        private Long req_time;
        @NotNull(message = "imp cannot be null")
        private Imp imp;
        @NotNull(message = "media cannot be null")
        private Media media;
        @NotNull(message = "device cannot be null")
        private Device device;
        private List<WifiMac> wifi_macs;
        private User user;

        public static class Imp {
            private String ad_id;
            private Integer ad_width;
            private Integer ad_high;
            private Integer pos;
            private List<Integer> img_mimes;
            private List<Integer> video_mimes;
            private List<Integer> url_schemes;
            private Double bid_floor;

            public String getAd_id() {
                return ad_id;
            }

            public void setAd_id(String ad_id) {
                this.ad_id = ad_id;
            }

            public Integer getAd_width() {
                return ad_width;
            }

            public void setAd_width(Integer ad_width) {
                this.ad_width = ad_width;
            }

            public Integer getAd_high() {
                return ad_high;
            }

            public void setAd_high(Integer ad_high) {
                this.ad_high = ad_high;
            }

            public Integer getPos() {
                return pos;
            }

            public void setPos(Integer pos) {
                this.pos = pos;
            }

            public List<Integer> getImg_mimes() {
                return img_mimes;
            }

            public void setImg_mimes(List<Integer> img_mimes) {
                this.img_mimes = img_mimes;
            }

            public List<Integer> getVideo_mimes() {
                return video_mimes;
            }

            public void setVideo_mimes(List<Integer> video_mimes) {
                this.video_mimes = video_mimes;
            }

            public List<Integer> getUrl_schemes() {
                return url_schemes;
            }

            public void setUrl_schemes(List<Integer> url_schemes) {
                this.url_schemes = url_schemes;
            }

            public Double getBid_floor() {
                return bid_floor;
            }

            public void setBid_floor(Double bid_floor) {
                this.bid_floor = bid_floor;
            }
        }

        public static class Media {
            private Long channel_id;
            private String self_media_id;
            private String media_id;
            private String meida_name;

            public Long getChannel_id() {
                return channel_id;
            }

            public void setChannel_id(Long channel_id) {
                this.channel_id = channel_id;
            }

            public String getSelf_media_id() {
                return self_media_id;
            }

            public void setSelf_media_id(String self_media_id) {
                this.self_media_id = self_media_id;
            }

            public String getMedia_id() {
                return media_id;
            }

            public void setMedia_id(String media_id) {
                this.media_id = media_id;
            }

            public String getMeida_name() {
                return meida_name;
            }

            public void setMeida_name(String meida_name) {
                this.meida_name = meida_name;
            }
        }

        public static class Device {
            private Integer dv_type;
            private String os;
            private String osv;
            private String adid;
            private String imei;
            private String mac;
            private String duid;
            private String idfa;
            private String openudid;
            private String carrier;
            private Integer net_type;
            private String ip;
            private String ua;
            private Integer dv_width;
            private Integer dv_high;
            private Integer density;
            private Integer orientation;
            private String vendor;
            private String model;
            private String lan;
            private Integer coord_type;
            private String geo;
            private String ssid;

            public Integer getDv_type() {
                return dv_type;
            }

            public void setDv_type(Integer dv_type) {
                this.dv_type = dv_type;
            }

            public String getOs() {
                return os;
            }

            public void setOs(String os) {
                this.os = os;
            }

            public String getOsv() {
                return osv;
            }

            public void setOsv(String osv) {
                this.osv = osv;
            }

            public String getAdid() {
                return adid;
            }

            public void setAdid(String adid) {
                this.adid = adid;
            }

            public String getImei() {
                return imei;
            }

            public void setImei(String imei) {
                this.imei = imei;
            }

            public String getMac() {
                return mac;
            }

            public void setMac(String mac) {
                this.mac = mac;
            }

            public String getDuid() {
                return duid;
            }

            public void setDuid(String duid) {
                this.duid = duid;
            }

            public String getIdfa() {
                return idfa;
            }

            public void setIdfa(String idfa) {
                this.idfa = idfa;
            }

            public String getOpenudid() {
                return openudid;
            }

            public void setOpenudid(String openudid) {
                this.openudid = openudid;
            }

            public String getCarrier() {
                return carrier;
            }

            public void setCarrier(String carrier) {
                this.carrier = carrier;
            }

            public Integer getNet_type() {
                return net_type;
            }

            public void setNet_type(Integer net_type) {
                this.net_type = net_type;
            }

            public String getIp() {
                return ip;
            }

            public void setIp(String ip) {
                this.ip = ip;
            }

            public String getUa() {
                return ua;
            }

            public void setUa(String ua) {
                this.ua = ua;
            }

            public Integer getDv_width() {
                return dv_width;
            }

            public void setDv_width(Integer dv_width) {
                this.dv_width = dv_width;
            }

            public Integer getDv_high() {
                return dv_high;
            }

            public void setDv_high(Integer dv_high) {
                this.dv_high = dv_high;
            }

            public Integer getDensity() {
                return density;
            }

            public void setDensity(Integer density) {
                this.density = density;
            }

            public Integer getOrientation() {
                return orientation;
            }

            public void setOrientation(Integer orientation) {
                this.orientation = orientation;
            }

            public String getVendor() {
                return vendor;
            }

            public void setVendor(String vendor) {
                this.vendor = vendor;
            }

            public String getModel() {
                return model;
            }

            public void setModel(String model) {
                this.model = model;
            }

            public String getLan() {
                return lan;
            }

            public void setLan(String lan) {
                this.lan = lan;
            }

            public Integer getCoord_type() {
                return coord_type;
            }

            public void setCoord_type(Integer coord_type) {
                this.coord_type = coord_type;
            }

            public String getGeo() {
                return geo;
            }

            public void setGeo(String geo) {
                this.geo = geo;
            }

            public String getSsid() {
                return ssid;
            }

            public void setSsid(String ssid) {
                this.ssid = ssid;
            }
        }

        public static class WifiMac {
            /**
             * 必填
             * 目标mac
             */
            String tmac;

            /**
             * 必填
             * 最近一次探测目标mac时间，值为 Unix 时间戳，单位毫秒
             */
            Long ttime;

            /**
             * 必填
             * 信号强度
             */
            Integer rssi;

            public String getTmac() {
                return tmac;
            }

            public void setTmac(String tmac) {
                this.tmac = tmac;
            }

            public Long getTtime() {
                return ttime;
            }

            public void setTtime(Long ttime) {
                this.ttime = ttime;
            }

            public Integer getRssi() {
                return rssi;
            }

            public void setRssi(Integer rssi) {
                this.rssi = rssi;
            }
        }

        public static class User {
            /**
             * 标签信息
             */
            String[] tags;

            /**
             * 广告请求上下文
             */
            String[] contexts;

            public String[] getTags() {
                return tags;
            }

            public void setTags(String[] tags) {
                this.tags = tags;
            }

            public String[] getContexts() {
                return contexts;
            }

            public void setContexts(String[] contexts) {
                this.contexts = contexts;
            }
        }

        public String getReq_id() {
            return req_id;
        }

        public void setReq_id(String req_id) {
            this.req_id = req_id;
        }

        public Integer getReq_source() {
            return req_source;
        }

        public void setReq_source(Integer req_source) {
            this.req_source = req_source;
        }

        public Long getReq_time() {
            return req_time;
        }

        public void setReq_time(Long req_time) {
            this.req_time = req_time;
        }

        public Imp getImp() {
            return imp;
        }

        public void setImp(Imp imp) {
            this.imp = imp;
        }

        public Media getMedia() {
            return media;
        }

        public void setMedia(Media media) {
            this.media = media;
        }

        public Device getDevice() {
            return device;
        }

        public void setDevice(Device device) {
            this.device = device;
        }

        public List<WifiMac> getWifi_macs() {
            return wifi_macs;
        }

        public void setWifi_macs(List<WifiMac> wifi_macs) {
            this.wifi_macs = wifi_macs;
        }

        public User getUser() {
            return user;
        }

        public void setUser(User user) {
            this.user = user;
        }
    }


    public static class Response {

        /**
         * 请求会话会话围一标识
         */
        String session_id;

        /**
         * 返回的响应码：
         * 70200 – success
         * 70204 – no fill
         */
        Integer res_code;

        /**
         * 错误码，参见 7.3 错误码
         */
        String error_code;

        /**
         * 素材信息 res_code=70200时
         */
        List<Seatbid> seat_bids;


        public static class Seatbid {
            /**
             * seatId 唯一标识
             */
            String seat_id;

            /**
             * 图片物料
             */
            PictureAd picture_ad;

            /**
             * 视频物料
             */
            VideoAd video_ad;

            /**
             * 广告创意id
             */
            String create_id;

            /**
             * 出价，当广告位为竞价广告该字段必返回
             */
            Double bid_price;


            public static class PictureAd {

                /**
                 * 标题
                 */
                String title;

                /**
                 * 描述
                 */
                String sub_title;

                /**
                 * 落地页类型
                 * redirect：跳转类，
                 * brand：品牌类
                 */
                String mtype;

                /**
                 * 图片地址
                 */
                String image_url;

                /**
                 * 图片文件MD5
                 */
                String image_md5;

                /**
                 * 落地页
                 */
                String landing_url;

                /**
                 * 素材宽
                 */
                Integer width;

                /**
                 * 素材高
                 */
                Integer high;

                /**
                 * 播放时长，单位毫秒
                 */
                Integer play_time;

                /**
                 * 曝光
                 */
                String[] imp_urls;

                /**
                 * 纯文本说明，如“xx 广告平台”，用
                 * 于存放指定的广告来源（若为
                 * 空则来源已经嵌入到物料，则
                 * 媒体不须要对广告来源进行额
                 * 外处理）
                 */
                String ad_source_mark;

                public String getTitle() {
                    return title;
                }

                public void setTitle(String title) {
                    this.title = title;
                }

                public String getSub_title() {
                    return sub_title;
                }

                public void setSub_title(String sub_title) {
                    this.sub_title = sub_title;
                }

                public String getMtype() {
                    return mtype;
                }

                public void setMtype(String mtype) {
                    this.mtype = mtype;
                }

                public String getImage_url() {
                    return image_url;
                }

                public void setImage_url(String image_url) {
                    this.image_url = image_url;
                }

                public String getImage_md5() {
                    return image_md5;
                }

                public void setImage_md5(String image_md5) {
                    this.image_md5 = image_md5;
                }

                public String getLanding_url() {
                    return landing_url;
                }

                public void setLanding_url(String landing_url) {
                    this.landing_url = landing_url;
                }

                public Integer getWidth() {
                    return width;
                }

                public void setWidth(Integer width) {
                    this.width = width;
                }

                public Integer getHigh() {
                    return high;
                }

                public void setHigh(Integer high) {
                    this.high = high;
                }

                public Integer getPlay_time() {
                    return play_time;
                }

                public void setPlay_time(Integer play_time) {
                    this.play_time = play_time;
                }

                public String[] getImp_urls() {
                    return imp_urls;
                }

                public void setImp_urls(String[] imp_urls) {
                    this.imp_urls = imp_urls;
                }

                public String getAd_source_mark() {
                    return ad_source_mark;
                }

                public void setAd_source_mark(String ad_source_mark) {
                    this.ad_source_mark = ad_source_mark;
                }
            }

            public static class VideoAd {
                /**
                 * 标题
                 */
                String video_url;

                /**
                 * 描述
                 */
                String video_md5;

                /**
                 * 落地页类型
                 * redirect：跳转类
                 * brand：品牌类
                 */
                String mtype;

                /**
                 * 播放时长 单位毫秒
                 */
                Integer duration;

                /**
                 * 落地页
                 */
                String landing_url;

                /**
                 * 曝光监控
                 */
                String[] imp_urls;

                /**
                 * 纯文本说明，如“xx 广告平台”，用
                 * 于存放指定的广告来源（若为空
                 * 则来源已经嵌入到物料，则媒体
                 * 不须要对广告来源进行额外处理）
                 */
                String ad_source_mark;

                public String getVideo_url() {
                    return video_url;
                }

                public void setVideo_url(String video_url) {
                    this.video_url = video_url;
                }

                public String getVideo_md5() {
                    return video_md5;
                }

                public void setVideo_md5(String video_md5) {
                    this.video_md5 = video_md5;
                }

                public String getMtype() {
                    return mtype;
                }

                public void setMtype(String mtype) {
                    this.mtype = mtype;
                }

                public Integer getDuration() {
                    return duration;
                }

                public void setDuration(Integer duration) {
                    this.duration = duration;
                }

                public String getLanding_url() {
                    return landing_url;
                }

                public void setLanding_url(String landing_url) {
                    this.landing_url = landing_url;
                }

                public String[] getImp_urls() {
                    return imp_urls;
                }

                public void setImp_urls(String[] imp_urls) {
                    this.imp_urls = imp_urls;
                }

                public String getAd_source_mark() {
                    return ad_source_mark;
                }

                public void setAd_source_mark(String ad_source_mark) {
                    this.ad_source_mark = ad_source_mark;
                }
            }

            public String getSeat_id() {
                return seat_id;
            }

            public void setSeat_id(String seat_id) {
                this.seat_id = seat_id;
            }

            public PictureAd getPicture_ad() {
                return picture_ad;
            }

            public void setPicture_ad(PictureAd picture_ad) {
                this.picture_ad = picture_ad;
            }

            public VideoAd getVideo_ad() {
                return video_ad;
            }

            public void setVideo_ad(VideoAd video_ad) {
                this.video_ad = video_ad;
            }

            public String getCreate_id() {
                return create_id;
            }

            public void setCreate_id(String create_id) {
                this.create_id = create_id;
            }

            public Double getBid_price() {
                return bid_price;
            }

            public void setBid_price(Double bid_price) {
                this.bid_price = bid_price;
            }
        }

        public String getSession_id() {
            return session_id;
        }

        public void setSession_id(String session_id) {
            this.session_id = session_id;
        }

        public Integer getRes_code() {
            return res_code;
        }

        public void setRes_code(Integer res_code) {
            this.res_code = res_code;
        }

        public String getError_code() {
            return error_code;
        }

        public void setError_code(String error_code) {
            this.error_code = error_code;
        }

        public List<Seatbid> getSeat_bids() {
            return seat_bids;
        }

        public void setSeat_bids(List<Seatbid> seat_bids) {
            this.seat_bids = seat_bids;
        }
    }
}
